from peewee import *

db = SqliteDatabase('example.db')

class User(Model):
    username = CharField(unique=True)
    birthday = DateField()

    class Meta:
        database = db
# 创建记录
user = User.create(username='charlie', birthday=datetime.date(1980, 1, 1))

# 查询记录
users = User.select().where(User.birthday > datetime.date(1990, 1, 1))
